#!/bin/sh
#
# pull -- pull the docker image from docker hub
#
# Copyright (C) 2016-2021 Wu Zhangjin <falcon@ruma.tech>
#

TOP_DIR="$(cd "$(dirname "$0")"/../../ && pwd)"
. "$TOP_DIR"/tools/docker/config >/dev/null

(docker search `get_lab_user` | grep -q $LAB_NAME) || (err_print "No $IMAGE found in docker hub" && exit 1)

do_op "docker pull" IMAGE
